package com.lzy.system.organization.dto.convert;

import com.lzy.system.organization.dto.SysNavAddDTO;
import com.lzy.system.organization.dto.SysNavSortDTO;
import com.lzy.system.organization.entity.SysNav;
import com.lzy.system.organization.vo.SysNavUserVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * description: 导航对象转换 <br>
 * date: 2023/12/5 下午6:13 <br>
 * author: lcc <br>
 * version: 1.0 <br>
 */
@Mapper(componentModel = "spring")
public interface SysNavConvert {

    @Mapping(source = "nav_name",target = "title")
    @Mapping(source = "nav_url",target = "href")
    @Mapping(source = "nav_icon",target = "icon")
    @Mapping(source = "nav_target",target = "openType")
    SysNavUserVo toUserVoEntity(SysNav sysNav);
    SysNav sortDTOToEntity(SysNavSortDTO sysNavSortDTO);
    List<SysNav> sortDTOToListEntity(List<SysNavSortDTO> sysNavSortDTOS);
    List<SysNavUserVo> toUserVoListEntity(List<SysNav> sysNav);
    SysNav addDTOToEntity(SysNavAddDTO sysNavAddDTO);
    SysNav updateDTOToEntity(SysNavUpdateDTO sysNavUpdateDTO);
    List<SysNav> addDTOToListEntity(List<SysNavAddDTO> sysNavAddDTOS);
}
